﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ForumFriendGroupsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Forum.ForumFriendGroupsAdmin" %>
<owc:OwGrid ID="ForumFriendGroupAdmingv" runat="server" SkinID="OwGridAdmin" DataSourceID="ForumFriendGroupOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace"
    OwMessageDisplayControl="">
    <MasterTableView DataSourceID="ForumFriendGroupOds" DataKeyNames="ForumFriendGroupID">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("ForumFriendGroupID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:ThumbImage %>' HeaderStyle-Width="200px">
                <ItemTemplate>
                    <asp:Image ID="ThumbImage" runat="server" ImageUrl='<%# Eval("ThumbImage") %>' Height="100px"
                        Width="100px" />
                </ItemTemplate>
                <HeaderStyle Width="200px"></HeaderStyle>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="NameOwR" runat="server" OwText="Name" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("Name")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="LanguageOwR" runat="server" OwText="Language" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="UserNameOwR" runat="server" OwText="UserName" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("UserID") != null ? (Membership.GetUser(Eval("UserID")) != null ? Membership.GetUser(Eval("UserID")).UserName : "n/a") : "n/a"%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="CompanyOwR" runat="server" OwText="Company" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwCompaniesBLL.OwGetEntity(Eval("CompanyID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ContinentOwR" runat="server" OwText="Continent" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("ContinentID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="CountryOwR" runat="server" OwText="Country" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("CountryID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ProvinceOwR" runat="server" OwText="Province" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("ProvinceID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DistrictOwR" runat="server" OwText="District" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("DistrictID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="WardOwR" runat="server" OwText="Ward" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity(Eval("WardID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%# Bind("IsDeleted") %>'
                                    AutoPostBack="True" Text='<%#Eval("ForumFriendGroupID")%>' CssClass="HiddenText" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/ForumFriendGroupsEdit.aspx?id=<%#Eval("ForumFriendGroupID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridButtonColumn ConfirmText="Delete" ButtonType="ImageButton"
                CommandName="Delete" Text="<%$ OwR:Delete %>" UniqueName="DeleteColumn" ImageUrl="<%$ OwI: CommandNameIcons/Delete.gif%>">
                <HeaderStyle Width="20px" />
            </owct:GridButtonColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="ForumFriendGroupOds" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwForumFriendGroupsBLL"
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwForumFriendGroupsEntity" DeleteMethod="OwDelete"
    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="companyID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
